package com.bluno.view;

import com.bluno.Util;
import com.bluno.view.obj.Button;
import com.bluno.view.obj.EnemyHand;
import com.bluno.view.obj.ImageObj;

import android.content.Context;

public class MainScene extends Scene{

	public MainScene(Context context) {
		super(context);
		Resourcer.loadGUIimages();
		Resourcer.loadCardsImage();
		this.background = Resourcer.imageMap.get("background0");
		ImageObj logo = new ImageObj();
		logo.setImage(Resourcer.imageMap.get("logo"));
		logo.setX(Util.SCREEN_MIDDLE_X - logo.getWidth()/2);
		logo.setY(10);
		this.addObj(logo);
		Button createButton = new Button()
		{
			@Override
			public void action()
			{
				mainActivity.createSession();
			}
		};
		createButton.setImages(Resourcer.imageMap.get("newGameButton0"),
				Resourcer.imageMap.get("newGameButton1"));
		createButton.setX(Util.SCREEN_MIDDLE_X - createButton.getWidth()/2);
		createButton.setY(Util.SCREEN_HEIGHT - createButton.getHeight()*2 - 15);
		super.addTouchableObj(createButton);
		Button connectToButton = new Button()
		{
			@Override
			public void action()
			{
				mainActivity.connectToSession();
			}
		};
		connectToButton.setImages(Resourcer.imageMap.get("connectButton0"),
				Resourcer.imageMap.get("connectButton1"));
		connectToButton.setY(Util.SCREEN_HEIGHT - createButton.getHeight() - 10);
		connectToButton.setX(Util.SCREEN_MIDDLE_X - createButton.getWidth()/2);
		super.addTouchableObj(connectToButton);

	}

}
